<template>
  <div ref="poster" style="background-color: #fff">
    海报设计
    <button @click="toggleFullscreen">全屏</button>
  </div>
</template>

<script>
import screenfull from "screenfull";
export default {
  data() {
    return {};
  },
  methods: {
    toggleFullscreen() {
      if (screenfull.isEnabled) {
        screenfull.toggle(this.$refs.poster); // 切换全屏状态
      } else {
        // 不支持全屏的处理逻辑
      }
    },
  },
};
</script>

<style scoped></style>
